{include file="common/header.tpl"}
{if $AppUI->id <= 0}
	{include file="index/login.tpl"}  
{else}
	{include file="common/menu.tpl"}
    <div class="rightColumn">
    	<div class="boxContent">
        	<div class="contentItem">
                <div class="contentItems">
                	<div class="headerTitle"><h2>Quản lý SEO{if $AppUI->type > 1 && isset($smarty.session.seo) && ($smarty.session.seo&1<<0) > 0} &raquo; <a href="{$smarty.const.HOST_BACKEND}seo/add">Thêm mới</a>{/if}</h2></div> 
                    <div class="secData">
                        {if $arrResult}
                            <div class="secActionAndPage">
                                <div class="actionLink">
                                    &nbsp;
                                </div>
                                <div class="totalPage"><strong>Tổng số: {$intTotal}</strong></div>
                            </div>
                        {/if}
                        <table width="100%" cellpadding="0" cellspacing="0" border="0">
                            <thead>
                                <tr>
                                    <th class="firstChild" width="150">Trang</th>         
                                    <th width="150">Tiêu đề</th>
                                    <th width="200">Từ khóa</th>
                                    <th>Mô tả</th>
                                    <th width="120">Ngày đăng</th>
                                    {if $arrResult} 
                                        <th width="60">&nbsp;</th>
                                    {/if}
                                </tr>
                            </thead>
                            <tbody>
                                {if $arrResult}
                                    {foreach item=item from=$arrResult}
                                        <tr class="{cycle values="odd,even"}">
                                            <td class="firstChild">{$item.name}</td>
                                            <td>{$item.title}</td>
                                            <td>{$item.keywords}</td>
                                            <td>{$item.description}</td>
                                            <td>{$item.postdate|date_format:"%d/%m/%Y %H:%M:%S"}</td>
                                            <td align="center">
                                                {if ($smarty.session.seo&1<<0)>0}
                                                    <a href="{$smarty.const.HOST_BACKEND}seo/detail?seoid={$item.seoid}" title="Xem thông tin chi tiết">
                                                        <img src="{$smarty.const.HOST_STATICS}img/icon/ad-link.png" alt="Detail" border="0" width="16" height="16" />
                                                    </a>
                                                {/if}
                                                {if ($smarty.session.seo&1<<2)>0}
                                                    <a href="{$smarty.const.HOST_BACKEND}seo/edit?seoid={$item.seoid}" title="Cập nhật thông tin">
                                                        <img src="{$smarty.const.HOST_STATICS}img/icon/ad-edit.png" alt="Edit" border="0" width="16" height="16" />
                                                    </a>
                                                {/if}
                                            </td>
                                        </tr>
                                    {/foreach}
                                {else}
                                    <tr><td align="center" colspan="5">Không có dữ liệu</td></tr>
                                {/if}
                            </tbody>
                        </table>
                        {if $arrResult}
                            <div class="secActionAndPage">
                                <div class="actionLink">
                                    &nbsp;
                                </div>
                                {paging total=$intTotal limit=$intLimit offset=$intOffset}
                            </div>
                        {/if}
                    </div>
                </div>
          	</div>
        </div>
    </div>
{/if}
{include file="common/footer.tpl"}
                
